package com.lsm.sm.entity;

import java.io.Serializable;

public class ProxyUser implements Serializable {
	
	private static final long serialVersionUID = 3500179002009858178L;
	private int id;
	private String name;
	
	public ProxyUser(){}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public void constructedFromUser( User user ){
		setId( user.getId() );
		setName( user.getName() );
	}

	@Override
	public int hashCode() {
		return id;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ProxyUser other = (ProxyUser) obj;
		if (id != other.id)
			return false;
		return true;
	}
}